/* eslint-disable prettier/prettier */
/*
包含 n个接口请求函数的模块
*/
import ajax from "./ajax";


// 分公司接口
export * from "./subCompanyApi";

// const file = require('./global_sivas.json')
// const BASE_URL = "http://"+file.ip +":5000";
export const video_address = "http://192.168.9.93:8090/live?app=live&stream=xiwan_01"
const BASE_URL = "http://192.168.9.93:8081";


/**
 * 查询时间名称列表和报警等级列表
 * @param {*} pramas
 */
export const reqStructure = pramas => ajax(BASE_URL + "/structure", pramas);

/**
 * 查询报警事件
 * @param {*} pramas
 */
export const reqEvent = pramas => ajax(BASE_URL + "/data/event/query", pramas);

/**
 * 事件统计 strict 版本，可用来统计违规事件数
 * @param {*} pramas
 */
export const reqStatistic = pramas => ajax(BASE_URL + "/data/event/statistic", pramas);

/**
 * 历史站长在站率
 * @param {*} pramas
 */
export const reqManagerOnlineHistory = pramas => ajax(BASE_URL + "/data/event/manager_online", pramas);

/**
 * 拥挤指数
 * @param {*} params
 */
export const reqCIHistory = params => ajax(BASE_URL + "/data/ci/query", params);

/**
 * 加油岛服务时间
 * @param {*} pramas
 */
export const reqIsleServiceTime = pramas => ajax(BASE_URL + "/data/isle/statistic", pramas);

/**
 * 加油岛服务车辆数和服务时间或超市服务次数和服务时间
 * @param {*} pramas
 */
export const reqService = pramas => ajax(BASE_URL + "/data/service/statistic", pramas);

 /**
 * 商店进店人数统计
 * @param {*} pramas
 */
export const reqCustomerEnter = pramas => ajax(BASE_URL + "/data/service/count_customer", pramas,'GET');

 /**
 * 违规率查询
 * @param {*} pramas
 */
export const reqViolateRate = pramas => ajax(BASE_URL + "/data/event/violate_rate", pramas,'GET');

/**
 * 综合得分
 * @param {*} pramas
 */
export const reqScore = pramas => ajax(BASE_URL + "/data/evaluation/query", pramas,'GET');



/**
 * 当前拥堵指数
 * @param {*} pramas
 */
export const reqCINow = pramas => ajax(BASE_URL + "/ci/now", pramas);

/**
 * 历史违规率统计
 * @param {*} pramas
 */
export const reqViolateHistory = pramas => ajax(BASE_URL + "/violate/history", pramas);

/**
 * 实时站长在站率
 * @param {*} pramas
 */
export const reqManagerOnlineNow = pramas => ajax(BASE_URL + "/manager_online/now", pramas);

/**
 * 当前服务时间全天占比
 * @param {*} pramas
 */
export const reqRefuelServiceNow = pramas => ajax(BASE_URL + "/refuel_service/today");

/**
 * 实时综合指数
 * @param {*} pramas
 */
export const reqCompositeIndexNow = pramas => ajax(BASE_URL + "/composite_index/now");

/**
 * 历史综合指数
 * @param {*} pramas
 */
export const reqCompositeIndexHistory = pramas => ajax(BASE_URL + "/composite_index/history", pramas);

/**
 * 查询流清单
 * @param {*} pramas
 */
export const reqStreamQuery = pramas => ajax(BASE_URL + "/stream/query", pramas,'GET');

/**
 * 拉取流
 * @param {*} pramas
 */
export const reqStreamPull = pramas => ajax(BASE_URL + "/stream/pull", pramas,'GET');

/**
 * 登录验证
 * @param {*} pramas
 */
 export const reqLoginVerify = pramas => ajax(BASE_URL + "/user/login", pramas,'POST')
 
 /**
 * 登出
 * @param {*} pramas
 */
 export const reqLogout = params => ajax(BASE_URL + "/user/logout",params,'POST');


/**
 * 商超区或收银区违规率统计
 * @param {*} pramas
 */
export const reqViolateNow = pramas => ajax(BASE_URL + "/violate/now", pramas);

/**
 * 注册账号
 * @param {*} pramas
 */
export const reqRegister = pramas => ajax(BASE_URL + "/user/register", pramas,'POST');

/**
 * 修改密码
 * @param {*} pramas
 */
export const reqRestPwd = pramas => ajax(BASE_URL + "/user/reset_pwd", pramas,'POST');

/**
 * 当前登录用户信息
 * @param {*} pramas
 */
export const reqUserInfo = pramas => ajax(BASE_URL + "/user/info", pramas,'GET');

/**
 * 获取视频列表
 * @param {*} pramas
 */
export const reqVideoList = pramas => ajax(BASE_URL + "/video/list", pramas,'GET');

/**
 * 检测视频完整性
 * @param {*} pramas
 */
export const reqVideoIntergrity = pramas => ajax(BASE_URL + "/video/scan", pramas,'GET');

/**
 * 检测摄像头在线情况
 * @param {*} pramas
 */
export const reqmonitorStatus = pramas => ajax(BASE_URL + "/ipc/scan", pramas,'GET');